package org.mparts.server.domain;

import java.io.Serializable;
import javax.persistence.*;
import javax.persistence.criteria.CriteriaBuilder;
import javax.persistence.criteria.CriteriaQuery;
import javax.persistence.criteria.Predicate;
import javax.persistence.criteria.Root;

import org.hibernate.annotations.Fetch;
import org.hibernate.annotations.FetchMode;

import java.util.ArrayList;
import java.util.List;

/**
 * The persistent class for the partitem database table.
 * 
 */
@Entity
public class Partitem extends EntityBase implements Serializable {
	private static final long serialVersionUID = 1L;
	
	//марка авто
	private Long auto;
	
	//код детали
	private String code;
	
	//номер двигателя
	private String engine;

	//тип детали
	@Fetch(FetchMode.JOIN)
	private Long grp;
	
	//URL картинки
	private String imgUrl;
	
	//год выпуска
	private String manDate;
	
	//модель авто
	private Long model;
	
	//примечание
	private String note;
	
	//номер кузова
	private String num;
	
	//привод
	private String drive;
	
	//цена
	private int price;
	
	//идентификатор заказа
	private Long orderId;

	//статус
	private Long status;

	//наименование типа детали
	private String grpName;
	
	//наименование марки авто
	private String autoName;
	
	//наименование модели авто
	private String modelName;
	
	private String cityName;
	
	//storage id
	private Long storeId;

	public Partitem() {
		status = 0L;
	}

	public Long getAuto() {
		return this.auto;
	}

	public void setAuto(Long auto) {
		this.auto = auto;
	}

	public String getCode() {
		return this.code;
	}

	public void setCode(String code) {
		this.code = code;
	}

	public String getEngine() {
		return this.engine;
	}

	public void setEngine(String engine) {
		this.engine = engine;
	}

	public Long getGrp() {
		return this.grp;
	}

	public void setGrp(Long grp) {
		this.grp = grp;
	}

	@Column(name = "img_url")
	public String getImgUrl() {
		return this.imgUrl;
	}

	public void setImgUrl(String imgUrl) {
		this.imgUrl = imgUrl;
	}

	// @Temporal(TemporalType.TIMESTAMP)
	@Column(name = "man_date")
	public String getManDate() {
		return this.manDate;
	}

	public void setManDate(String manDate) {
		this.manDate = manDate;
	}

	public Long getModel() {
		return this.model;
	}

	public void setModel(Long model) {
		this.model = model;
	}

	public String getNote() {
		return this.note;
	}

	public void setNote(String note) {
		this.note = note;
	}

	public String getNum() {
		return this.num;
	}

	public void setNum(String num) {
		this.num = num;
	}

	public int getPrice() {
		return this.price;
	}

	public void setPrice(int price) {
		this.price = price;
	}

	@Column(name = "order_id")
	public Long getOrderId() {
		return orderId;
	}

	public void setOrderId(Long orderId) {
		this.orderId = orderId;
	}

	public Long getStatus() {
		return status;
	}

	public void setStatus(Long status) {
		this.status = status;
	}

	@Column(name = "grp_name")
	public String getGrpName() {
		return grpName;
	}

	public void setGrpName(String grpName) {
		this.grpName = grpName;
	}

	@Column(name = "auto_name")
	public String getAutoName() {
		return autoName;
	}

	public void setAutoName(String autoName) {
		this.autoName = autoName;
	}

	@Column(name = "model_name")
	public String getModelName() {
		return modelName;
	}

	public void setModelName(String modelName) {
		this.modelName = modelName;
	}

	public String getDrive() {
		return drive;
	}

	public void setDrive(String drive) {
		this.drive = drive;
	}

	public String getCityName() {
		return cityName;
	}

	public void setCityName(String cityName) {
		this.cityName = cityName;
	}

	@Column(name = "store_id")
	public Long getStoreId() {
		return storeId;
	}

	public void setStoreId(Long storeId) {
		this.storeId = storeId;
	}


}